﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.Text;
using DataAccessLayer;

namespace IndexMarkWcfService
{
    
    [ServiceContract]
    public partial interface IIndexMarkService
    {
        [OperationContract]
        IEnumerable<DTO.Organization> GetOrganizations();

        [OperationContract]
        IEnumerable<DTO.Period> GetPeriods();
        
        [OperationContract]
        IEnumerable<DTO.Term> GetTerms();
        
        [OperationContract]
        IEnumerable<DTO.RespondentAnswers> GetRespAnswers(int IDCharTerm,  Nullable<int> IDDep);

        [OperationContract]
        DTO.RespondentAnswers GetAnswersByResp(int IDCharTerm, int RespID);

        [OperationContract]
        IEnumerable<DTO.Gradation> GetGradations(int CharTermID);

        [OperationContract]
        IEnumerable<DTO.Section> GetTree(int IDTerm);

        [OperationContract]
        void SaveAnswers(DTO.RespondentAnswers RA);

        [OperationContract]
        DTO.User GetUser(int IDTerm);

        [OperationContract]
        IEnumerable<DTO.Department> GetDepartmentsList(int IDTerm);

        [OperationContract]
        IEnumerable<DTO.IndexRow> GetIndexes(int TermID, IEnumerable<int> Cats,
            IEnumerable<int> Chars, IEnumerable<int> Respondents, DTO.IndexListType Type);
        [OperationContract]
        IEnumerable<DTO.IndexRow> GetIndexes2(int TermID, IEnumerable<int> Cats,
            IEnumerable<int> Chars, IEnumerable<int> Respondents,
            DTO.IndexListType Type, DTO.IndexStrategyType Strategy);
        [OperationContract]
        IEnumerable<DTO.IndexRow> GetIndexesDoc(int TermID, IEnumerable<int> Cats,
            IEnumerable<int> Chars, IEnumerable<int> Respondents);

        [OperationContract]
        IEnumerable<DTO.Category> GetCategories(int TermID);

        [OperationContract]
        IEnumerable<DTO.Department> GetUSTUTree(int TermID);

        [OperationContract]
        [ServiceKnownType(typeof(DTO.Section))]
        [ServiceKnownType(typeof(DTO.Characteristic))]
        IEnumerable<DTO.Section> GetISTree(int TermID);

        [OperationContract]
        IEnumerable<DTO.Reports.VolumsPPS> GetVolumsPPS(int TermID, IEnumerable<int> Respondents, IEnumerable<int> Cats, IEnumerable<int> Sections);

        [OperationContract]
        IEnumerable<DTO.Reports.VolumePPS> GetOrderedVolums(int IDCharGrad);


        //[OperationContract]
        //IEnumerable<DTO.QuestionablyValue> GetQuestionablyValues(int TermID, IEnumerable<int> Respondents, IEnumerable<int> Cats, IEnumerable<int> Sections, int PersentDeviation);


        [OperationContract]
        IEnumerable<DTO.Money> GetPremiums(int TermID);
        [OperationContract]
        IEnumerable<DTO.Money> GetPremiums2(int TermID, DTO.IndexStrategyType Strategy);

        //[OperationContract]
        //IEnumerable<DTO.Department> GetFacultyList(int TermID);

        //[OperationContract]
        //IEnumerable<DTO.Position> GetPositionList();

        //[OperationContract]
        //IEnumerable<DTO.SectionLite> GetParentsSections(int TermID);


        [OperationContract]
        IEnumerable<DTO.Reports.NullChar> GetNullableChars(int TermID);

        [OperationContract]
        IEnumerable<DTO.Position> GetPositionList();

        [OperationContract]
        IEnumerable<DTO.Section> GetParentsSections(int TermID);

        [OperationContract]
        IEnumerable<DTO.IndexRow> GetLIDIA(int TermID, int[] RespID);
    }

}
